<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Clips</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="saved_searches.html" class="calibreAPrev">previous page</a>
        

        
          <a href="clipboard_history.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 id="clips" class="calibre5">Clips</h2>

  <p class="h2subheading">— Saving Text and Styles —</p>

  <p class="calibre1">Clips allow you to save snippets of text and paste them into your document at any time. They can also be used to insert HTML style tags around your text. You can create clips using the Clip Editor, use the Clips window to quickly select a clip, use a Clip Bar toolbar to select a clip using a button, or use keyboard shortcuts to access the clips. And you can even automatically fill the Clips list from your CSS stylesheet styles.</p>

  <h3 class="sigilnotintoc">Clip Editor</h3>

  <p class="calibre1">To open the Clip Editor, select the menu item <span class="shortcut">Tools→Clip Editor</span> or its keyboard shortcut:</p>

  <div class="image"><img alt="clip-editor-main" src="../Images/clip-editor-main.png" class="calibre7"/></div>

  <h4 class="sigilnotintoc1">Context Menu</h4>

  <p class="calibre1">Most actions concerning editing clips are accessed using the right-click context menu:</p>

  <div class="image"><img alt="clip-editor-context-menu" src="../Images/clip-editor-context-menu.png" class="calibre7"/></div>

  <p class="calibre1">Select one or more entries then right-click on the selection for the following options:</p>

  <ul class="calibre3">
    <li class="calibre4"><span class="listheading">Add Entry:</span> Add a blank search under the entry you clicked.</li>

    <li class="calibre4"><span class="listheading">Add Group:</span> Add a new group under the entry you clicked.</li>

    <li class="first"><span class="listheading">Edit:</span> Edit the entry.</li>

    <li class="first"><span class="listheading">Cut:</span> Delete one or more entries that can be pasted later.</li>

    <li class="calibre4"><span class="listheading">Copy:</span> Copy one or more entries that can be pasted later.</li>

    <li class="calibre4"><span class="listheading">Paste:</span> Paste any cut/copied entries.</li>

    <li class="first"><span class="listheading">Delete:</span> Delete entries or groups.</li>

    <li class="first"><span class="listheading">Import:</span> Read a list of exported entries from a file into the list.</li>

    <li class="calibre4"><span class="listheading">Reload:</span> Restore the list from the last saved state.</li>

    <li class="first"><span class="listheading">Export:</span> Save selected entries to a file for sharing.</li>

    <li class="calibre4"><span class="listheading">Export All:</span> Save all entries to a file.</li>

    <li class="first"><span class="listheading">Autofill:</span> Create clips from your CSS stylesheets.</li>

    <li class="first"><span class="listheading">Collapse All:</span> Collapse the display of all groups.</li>

    <li class="calibre4"><span class="listheading">Expand All:</span> Expand the display of all groups.</li>
  </ul>

  <p class="calibre1">You can also use the <span class="buttonbox">Add Entry</span> or <span class="buttonbox">Add Group</span> buttons to add new items.</p>

  <h4 class="sigilnotintoc1">Save</h4>

  <p class="calibre1">To save your entries to disk, click <span class="buttonbox">Save</span>.</p>

  <p class="calibre1">To exit without saving your entries you can just close the window (with the <span class="buttonbox">Close</span> button or the <span class="shortcut">Esc</span> key) and confirming you don’t want to save if prompted. You can also use the context menu <span class="shortcut">Reload</span> to reload your entries from disk – which will delete your current entries.</p>

  <p class="calibre1">You can use the <span class="shortcut">Export</span> and <span class="shortcut">Import</span> context menu items to save your searches so that they can be shared with others.</p>

  <div class="tip">
    <p class="tiptext">If you save and are running more than one copy of Sigil, then the other instances of Sigil will automatically reload the newly saved clips to keep all copies in sync.</p>
  </div>

  <h4 class="sigilnotintoc1">Filter</h4>

  <p class="calibre1">You can use the filter text box to restrict the list of clips shown to make it easier to find text.</p>

  <h4 class="sigilnotintoc1">Moving Entries</h4>

  <p class="calibre1">You can move entries or groups around by using the arrow keys or by drag and drop.</p>

  <p class="calibre1">In order to group entries you must first create a group to put them in.</p>

  <h4 class="sigilnotintoc1">Pasting Clips</h4>

  <p class="calibre1">Clicking the button <span class="buttonbox">Paste Clip</span> will paste the entry you selected into the last window you selected (your document in Book View or Code View, or Find &amp; Replace).</p>

  <div class="tip">
    <p class="tiptext">You can paste a clip using just the keyboard by using the shortcut to open Clips, typing your clip name in the filter box and hitting return (and then Esc if you want to close the window). But using a keyboard shortcut may be easier.</p>
  </div>

  <p class="calibre1">You can also paste a group or selection of clips if necessary.</p>

  <p class="calibre1">You can also right-click on your text in Book View or Code View to bring up the context menu. You can then select your clip and it will be inserted immediately.</p>

  <h4 class="sigilnotintoc1">Autofilling CSS Entries</h4>

  <p class="calibre1">The Autofill context menu item will scan your CSS stylesheets and create a clip entry for each simple selector it finds.</p>

  <p class="calibre1">For example, if you have the selector or style "p.first" then Autofill will create a clip for it as follows:</p>
  <pre class="example1">&lt;p class="first"&gt;\1&lt;/p&gt;</pre>

  <p class="calibre1">If the selector is "*.class" then Autofill will create entries for "p.class", "div.class", and "span.class".</p>

  <p class="calibre1">All new Autofill clips are stored in the "Autofill" group. If the "Autofill" group does not exist it will be created. You can rename the group once it has been created, and you can move or copy any entry to any group.</p>

  <h3 class="sigilnotintoc">Clip Bar</h3>

  <p class="calibre1">The Clip Bar is an optional toolbar that will show buttons for the first 20 clips that are not in a group. You can display the Clip Bar by selecting the menu View→Toolbars→Clips:</p>

  <div class="image"><img alt="clips-clip-bar" src="../Images/clips-clip-bar.png" class="calibre7"/></div>

  <p class="calibre1">The buttons will show the clip’s name, so you may want to keep the names short. You can use them as shortcuts for your own styles or even for common special characters.</p>

  <div class="tip">
    <p class="tiptext">Clips can also have keyboard shortcuts – see <span class="menuitem">Insert→Clip</span></p>
  </div>

  <h3 class="sigilnotintoc">Clips Window</h3>

  <p class="calibre1">The Clips window is a dockable window that shows all your Clips in a list and allows you to click an entry to paste it into your text. You can display the Clips window by selecting the menu View→Clips:</p>

  <div class="image"><img alt="clips-clips-window" src="../Images/clips-clips-window.png" class="calibre7"/></div>

  <h3 class="sigilnotintoc">Using Clips to Format Text</h3>

  <p class="calibre1">Clips provide a way to paste text before and after selected text – to give you a basic ability to format your text.</p>

  <p class="calibre1">If you define a clip using "\1" in the text then Clips will treat this as a Regex replacement command. When you paste the clip, the "\1" will be replaced with whatever text was selected.</p>

  <p class="calibre1">For example, if your clip is</p>
  <pre class="example1">&lt;span class="name"&gt;\1&lt;/span&gt;</pre>

  <p class="calibre1">and you select the text</p>
  <pre class="example1">Hello World</pre>

  <p class="calibre1">Then when you apply the clip the text will be changed to</p>
  <pre class="example1">&lt;span class="name"&gt;Hello World&lt;/span&gt;</pre>

  <p class="calibre1">You can use this to build up a library of styles and formatting that can be applied quickly. Any text can be used in Code View. But in Book View only limited clips can be used – in particular span tags. This is because you will be inserting into an existing paragraph – and you can’t insert certain tags inside a paragraph tag.</p>

  <p class="calibre1">You can use other regex commands in your clip, although complex regex statements might not work.</p>

  <div class="tip">
    <p class="tiptext">You can use <span class="menuitem">Ctrl+Space</span> to remove formatting tags from selected text before pasting a clip.</p>
  </div>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="saved_searches.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="clipboard_history.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
